package jf.myfristservice;

import android.app.Activity;
import android.os.CountDownTimer;


public class Timer extends CountDownTimer {
	
	private MainActivity oMainActivity;


	public Timer(long millisInFuture, long countDownInterval) {
		super(millisInFuture, countDownInterval);

	}
	
	public Timer(long millisInFuture, long countDownInterval, Activity oActivity) {
		super(millisInFuture, countDownInterval);
		
		oMainActivity	= (MainActivity)oActivity;
	}	
	
	@Override
    public void onFinish() {
		oMainActivity.TimerEnd();
    }

	@Override
    public void onTick(long millisUntilFinished) {
		oMainActivity.setTimerTextView(millisUntilFinished);
    }
	

}
